import './assets/main.css'
import './assets/iconfont.css'
import { createApp } from 'vue'
import { createI18n } from 'vue-i18n' 
import App from './App.vue'
import router from './router'
import 'amfe-flexible'
import ElementPlus from 'element-plus'


// 导入你的本地化消息文件  
import cn from './lang/cn.json'  
import vn from './lang/vn.json'
import en from './lang/en.json' 
import sin from './lang/sin.json'

// 创建 i18n 实例  
const i18n = createI18n({  
    locale: localStorage.getItem('locale')||'vn', // 设置默认语言  
    // fallbackLocale: 'vn', // 当没有指定语言时的回退语言  
    messages: {  
        cn: cn,  
        vn: vn,
		en: en,
		sin: sin,
    }  
  
})


import 'element-plus/dist/index.css'
//导入状态管理
// import Store from '@/store/index.js';

import Toast from '@/utils/toast/index.js'; // 导入 Toast 插件
import Alert from '@/utils/alert/index.js'; // 导入 Toast 插件
import Store from '@/store/index.js';
var app = createApp(App);
app.config.globalProperties.$toast = Toast;
app.config.globalProperties.$alert = Alert;
app.use(router).use(Store).use(i18n).use(ElementPlus).mount('#app');

